<?php

namespace App\Repositories;

use App\Models\Province;

class ProvinceRepository extends BaseRepository
{
    public function model()
    {
        return Province::class;
    }

    /**
     * 获取订单列表
     * Date: 2018/05/10
     * @author Tenny
     * @param $area_id
     * @return \Illuminate\Database\Eloquent\Collection|static[]
     */
    public function getProvinces($area_id = false)
    {
        if ($area_id !== false) {
            $this->where('area_id', '=', $area_id);
        }
        $areas = $this->get();
        return $areas;
    }

    protected function serialization(array $attributes)
    {
        // TODO: Implement serialization() method.
    }
}